Check out my new scripts on my new blog: https://rivanoor.info
Friday, October 16, 2020
Monday, April 22, 2019
return FALSE
I found out that
return FALSE
is useless for outside world, after fiddling with ajax all night long. You need to echo
your output so the world know what the eff are you talking about.
Friday, April 20, 2012
Maxscript - Frameless Glass
Creating same object (or editing predefined .max library) is sucks, especially with simple one like this. So what this script does is take your spline base object (currently works on single object only), shell it, clone, a bit chamfer and merge the object onto single editable poly with different ids for glass and rubber sealant. Due to possible artifact with advance renderer (glass touching solid object), I made air gap between glass and frame/sealant.This script is an amateur work and might not be optimized, if you have a better version please do share with me.
Frameless glass object
ver: 0.1
what this script do and doesnt:
- Create simple frameless glass object with a simple rubber sealant around the glass perimeter. the glass would have sub-obj id 1 and sealant 2
- Works with centimeter unit. For conversion edit values marked "-- in cm" with converted value in your file unit.
- Overall depth of glass with sealant is 2.1 cm
how to use it:
- Run script (maxscript > run), customize toolbar, drag anywhere to your toolbar or simply create new one.
The script available under category "- i -".Use mzp for simple drag and drop.
- Create spline around your window, click assigned button, done.
requirement: tested on 3dsmax 2009
todo:
- slice glass object larger than predetermined dimension
credits: attaching selection is part of soulburn script
The script or grab .mzp version (drag n drop to max viewport):
Hope someone find it useful.
cheers
Frameless glass object
ver: 0.1
what this script do and doesnt:
- Create simple frameless glass object with a simple rubber sealant around the glass perimeter. the glass would have sub-obj id 1 and sealant 2
- Works with centimeter unit. For conversion edit values marked "-- in cm" with converted value in your file unit.
- Overall depth of glass with sealant is 2.1 cm
how to use it:
- Run script (maxscript > run), customize toolbar, drag anywhere to your toolbar or simply create new one.
The script available under category "- i -".Use mzp for simple drag and drop.
- Create spline around your window, click assigned button, done.
requirement: tested on 3dsmax 2009
todo:
- slice glass object larger than predetermined dimension
credits: attaching selection is part of soulburn script
The script or grab .mzp version (drag n drop to max viewport):
macroScript Object_FramelessGlass
category:"- i -"
toolTip:"Frameless Glass"
buttontext:"FG"
(
o = for i in selection collect i
if (o.count != 1 or superclassof $ != shape) then
MessageBox "Please select one spline at a time" title:"Frameless Glass"
else
(
disableSceneRedraw()
-- checking reversed spline
reversed = false
o = $
convertToSplineShape o
bb1 = (o.max - o.min)
applyOffset o .3 -- in cm
bb2 = (o.max - o.min)
select o
deleteSpline o 2
if (bb1[1] < bb2[1]) then
(
reversed = true
applyOffset o -.3 -- in cm
-- print "reversed"
) else (
applyOffset o .3 -- in cm
-- print "normal"
)
deleteSpline o 1
-- glass
select o
modPanel.addModToSelection (Shell ()) ui:on
o.modifiers[#Shell].innerAmount = 0.4 -- in cm
o.modifiers[#Shell].outerAmount = 0.4 -- in cm
modPanel.addModToSelection (Materialmodifier ())
-- sealant
maxOps.cloneNodes o cloneType:#copy newNodes:&nnl
select nnl
deleteModifier $ 1
deleteModifier $ 1
if reversed == true then ( applyOffset $ .3 ) else (applyOffset $ -.3) -- in cm
deleteSpline nnl 1
select nnl
modPanel.addModToSelection (Shell ()) ui:on
$.modifiers[#Shell].innerAmount = 0.25 -- in cm
$.modifiers[#Shell].outerAmount = 0.25 -- in cm
convertto nnl editable_poly
subobjectLevel = 4
$.EditablePoly.SetSelection #Face #{1..2}
$.insetAmount = 0.5 -- in cm
$.EditablePoly.buttonOp #Inset
$.ConvertSelection #Face #Edge
fedge = polyop.getEdgeSelection $
$.bridgeSelected = 1
$.EditablePoly.Bridge ()
subobjectLevel = 2
$.EditablePoly.SetSelection #Edge fedge
$.edgeChamfer = 0.2 -- in cm
$.edgeChamferSegments = 2
$.EditablePoly.buttonOp #Chamfer
move $.Verts [0,0,0.8] -- in cm
subobjectLevel = 0
modPanel.addModToSelection (symmetry ()) ui:on
$.modifiers[#Symmetry].axis = 2
modPanel.addModToSelection (Materialmodifier ()) ui:on
$.modifiers[#Material].materialID = 2
-- attach all object
convertto o editable_poly
select o
for s in selection do append nnl o
select nnl
for i in 1 to selection.count do
Try(ConvertTo Selection[i] Editable_Poly)Catch()
baseObj = selection[1]
items = #()
for s in selection do append items s
for i in items do
(
if (i != baseObj) then (
if (classof i == Editable_mesh) or (classof i == Editable_Poly) then
baseObj.EditablePoly.attach i baseObj
)
)
-- cleaning up
enableSceneRedraw()
completeRedraw()
gc()
)
)
Hope someone find it useful.
cheers
Saturday, February 11, 2012
Boolean disaster
Bad news. I've been going under lot of pressure this weekend as my wife went into medical treatment at nearby hospital. Her asthma suddenly relapsed and to make it worse, i received complaint for some of my blog post sat the same time. If you notice, i deleted 2 posts and removed their companion files. Well, this is what happen when we didnt prepare enough, Murphy's Law will always take action.
In between back and forth to hospital, luckily I still managed to get my stuff done. And like the other complicated situation, I totally forgot how to solve a simple problem. This time, it is Boolean operation.
Perhaps you already knew the fact that most of 3D artists will always avoid using boolean. The result is kind of ugly topology and sometimes also affecting the stability (try to boolean a large object, add some stacks and leave it as it is as you work with your scene, you'll know what I mean). But there were times when boolean could help speed up some process. I consider merging two cylinders as this specific situation.
Here is my base model. Its simply just a small cylinder attached to a bigger cylinder. I boolean them and start fixing the edges and then add symmetry modifier:
What happen when when I added a subdivision modifier? here's the screenshot:
You can see that some spot of topology got clipped. At first I was like "Ah, unwelded vertices", then i run from weld, target weld, bridge, delete to finally rebuild the mesh, they all went into same thing, some part of it got clipped. Detach it, create new geometry and attach them into new geometry, nothing. I replaced subdiv modifier, and its still the same:
Okay, at this point the bell rang in my head. I remember i had solution for fixing automatic edge crease value assigned by boolean operation (did I mention boolean? I didnt even remember i was using boolean when working with this model. In fact, I previously did checked edge crease and all my edges were uniformly at 0 value). I simply re-collapsed my object to editable mesh and re-collapsed it again to editable poly, and tadaaaa, the clip disappeared:
For you who has problem either clipped edge or a ridge/harsh after a using boolean, right click on your object > convert to editable mesh and right click on your object > convert to editable poly would do the justice. I usually did the workflow straight after boolean operation, only this time I got too may things going at once i could barely think of anything. I found this technique quite long time ago and apparently never got fixed for some reason we probably would never know. Just read this tips, even 3ds max 2.0 have this sort of automatic edge crease problem.
And now, another interesting fact i found two days ago: although some folks mention the advantage of using turbosmooth modifier is less memory consumption, it actually almost double the face counts than meshmooth (both use level 1 with isoline display off). You can read total faces using turbosmooth and meshsmooth compared on exactly the same object above. And what puzzles me even more, 1 on 1 comparison (I snap them into single position), all vertices exactly have the same position on both modifiers, ie: there is no geometry difference between object using turbosmooth and meshsmooth. Only face counts were different. How is that even possible? I dont know. But, (yea, there's always but), this face counts resort to meshsmooth face counts when the geometry collapsed into single mesh. You'll see significant face counts decrease after you collapse objects with turbosmooth modifier.
And as a thank you for your time reading this post, here's the (previously) horrible model I showed you above:
Download: 3dsMax9, Vray. Mediafire
Good news is, not confirmed yet though, my wife will likely get back home this noon. Yay!. Its breaking my heart to see my 3 years old cried to sleep each night looking for his mom.
In between back and forth to hospital, luckily I still managed to get my stuff done. And like the other complicated situation, I totally forgot how to solve a simple problem. This time, it is Boolean operation.
Perhaps you already knew the fact that most of 3D artists will always avoid using boolean. The result is kind of ugly topology and sometimes also affecting the stability (try to boolean a large object, add some stacks and leave it as it is as you work with your scene, you'll know what I mean). But there were times when boolean could help speed up some process. I consider merging two cylinders as this specific situation.
Here is my base model. Its simply just a small cylinder attached to a bigger cylinder. I boolean them and start fixing the edges and then add symmetry modifier:
What happen when when I added a subdivision modifier? here's the screenshot:
You can see that some spot of topology got clipped. At first I was like "Ah, unwelded vertices", then i run from weld, target weld, bridge, delete to finally rebuild the mesh, they all went into same thing, some part of it got clipped. Detach it, create new geometry and attach them into new geometry, nothing. I replaced subdiv modifier, and its still the same:
Okay, at this point the bell rang in my head. I remember i had solution for fixing automatic edge crease value assigned by boolean operation (did I mention boolean? I didnt even remember i was using boolean when working with this model. In fact, I previously did checked edge crease and all my edges were uniformly at 0 value). I simply re-collapsed my object to editable mesh and re-collapsed it again to editable poly, and tadaaaa, the clip disappeared:
For you who has problem either clipped edge or a ridge/harsh after a using boolean, right click on your object > convert to editable mesh and right click on your object > convert to editable poly would do the justice. I usually did the workflow straight after boolean operation, only this time I got too may things going at once i could barely think of anything. I found this technique quite long time ago and apparently never got fixed for some reason we probably would never know. Just read this tips, even 3ds max 2.0 have this sort of automatic edge crease problem.
And now, another interesting fact i found two days ago: although some folks mention the advantage of using turbosmooth modifier is less memory consumption, it actually almost double the face counts than meshmooth (both use level 1 with isoline display off). You can read total faces using turbosmooth and meshsmooth compared on exactly the same object above. And what puzzles me even more, 1 on 1 comparison (I snap them into single position), all vertices exactly have the same position on both modifiers, ie: there is no geometry difference between object using turbosmooth and meshsmooth. Only face counts were different. How is that even possible? I dont know. But, (yea, there's always but), this face counts resort to meshsmooth face counts when the geometry collapsed into single mesh. You'll see significant face counts decrease after you collapse objects with turbosmooth modifier.
And as a thank you for your time reading this post, here's the (previously) horrible model I showed you above:
Download: 3dsMax9, Vray. Mediafire
Good news is, not confirmed yet though, my wife will likely get back home this noon. Yay!. Its breaking my heart to see my 3 years old cried to sleep each night looking for his mom.
Thursday, February 09, 2012
Pin Up and G-Chair
Manufacturer: Infinti Design
Model: Pin-Up
Description: Pin Up is a free curvy design that develops from a disc-shaped base into an unusual shape, enhanced by a range of 5 joyous and innovative colours to excite, inspire and express personality. The full-grain leather version reveals the softer side of Pin Up, designed for maximum comfort. Modern and elegant, it comes in a choice of stylish colours - white, ivory, red, dark brown and black - and adds a touch of class to any room. The Pin Up chair is made of Freeform soft integral polyurethane or foamed polyurethane, available in five original colours. The polished steel base features integrated swivel mechanism. The upholstery comes in ultra-soft full-grain leather or Melange fabric.
Download: Max 9 format,Vray. Mediafire
Manufacturer: Infinti Design
Model: G-Chair
Description: Die-cast aluminium frame. Cold-foamed polyurethane seat and backrest.
Download: Max 9 format,Vray. Mediafire
Sunday, January 22, 2012
Swan Chair
Manufacturer: Fritzhansen
Designer: Arne Jacobsen
Model: The Swan
Description: Arne Jacobsen designed The Swan™ as well as the Egg™ for the lobby and lounge areas at the Royal Hotel in Copenhagen, in 1958. The commission to design every element of the hotel building as well as the furniture was Jacobsen’s grand opportunity to put his theories of integrated design and architecture into practice. In 1958 the Swan was a technologically innovative chair: No straight lines - only curves. A moulded shell of synthetic material on an aluminium star swivel base, with a layer of cold foam covering the shell upholstered in fabric or leather. These two original designer chairs originated in Jacobsen’s own garage in his home in Klampenborg, north of Copenhagen and have been in production at Fritz Hansen ever since. The Swan is ideal for lounge and waiting areas as well as the home. It is available in several leather types and fabric upholstery. The base is always star shaped in satin polished aluminium.
Download: Max9, Vray. Mediafire
Designer: Arne Jacobsen
Model: The Swan
Description: Arne Jacobsen designed The Swan™ as well as the Egg™ for the lobby and lounge areas at the Royal Hotel in Copenhagen, in 1958. The commission to design every element of the hotel building as well as the furniture was Jacobsen’s grand opportunity to put his theories of integrated design and architecture into practice. In 1958 the Swan was a technologically innovative chair: No straight lines - only curves. A moulded shell of synthetic material on an aluminium star swivel base, with a layer of cold foam covering the shell upholstered in fabric or leather. These two original designer chairs originated in Jacobsen’s own garage in his home in Klampenborg, north of Copenhagen and have been in production at Fritz Hansen ever since. The Swan is ideal for lounge and waiting areas as well as the home. It is available in several leather types and fabric upholstery. The base is always star shaped in satin polished aluminium.
Download: Max9, Vray. Mediafire
Saturday, January 14, 2012
Free 3D Models
Recently finished Microso*t Zune HD, download here (Mediafire, 3,5Mb).
The rest of my models check here.
Subscribe to:
Comments (Atom)